package com.gjintel.framework.paytype.service.impl;

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.gjintel.framework.cache.InitCacheData;
import com.gjintel.framework.cache.InitCacheData.CacheType;
import com.gjintel.framework.dept.model.Dept;
import com.gjintel.framework.paytype.dao.IPayTypeDao;
import com.gjintel.framework.paytype.model.PayType;
import com.gjintel.framework.paytype.service.IPayTypeService;
import com.gjintel.framework.util.CommUtil;
import com.gjintel.sdk.base.dao.Page;
import com.gjintel.sdk.base.dao.Sort;
import com.gjintel.sdk.base.service.impl.BaseServiceImpl;
import com.gjintel.sdk.dto.TreeDto;
import com.gjintel.sdk.util.StringUtil;
/**
 * @description 交易方式实现接口
 * @author fengya
 * @date 2016-3-15 下午03:40:12
 */
@Service("payTypeService")
public class PayTypeServiceImpl extends BaseServiceImpl implements IPayTypeService{

	@Autowired
	private IPayTypeDao payTypeDao;
	
	@Override
	public List<PayType> findAll() {
		return this.payTypeDao.findAll();
	}

	@SuppressWarnings("unchecked")
	@Override
	public void findAll(Page page,PayType payType) {
		this.payTypeDao.findAll(page,payType);
		PayType temp = null;
		Iterator<PayType> payTypeIt = page.getResult().iterator();
		PayType mdel = null;
		while (payTypeIt.hasNext()) {
			temp = payTypeIt.next();
		}
	}

	@Override
	public void removeData(String deleteIds) throws Exception {
		PayType payType = null;
		for (String id : deleteIds.split(",")) {
			payType = this.get(PayType.class, id);
			this.remove(payType);

		}
	}
	
}

